package com.xiaoshuidi.cloud.module.contract.convert.contract;

import com.xiaoshuidi.cloud.module.contract.controller.admin.contract.vo.ElectronicContractGenerateRespVO;
import com.xiaoshuidi.cloud.module.contract.dal.dataobject.contract.ElectronicContractDO;
import com.xiaoshuidi.cloud.module.contract.service.contract.dto.RoomInfoFillDTO;
import com.xiaoshuidi.cloud.module.contract.service.contract.dto.RoomInfoOwnerFillDTO;
import com.xiaoshuidi.cloud.module.rooms.vo.RoomHouseRespVo;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;

/**
 * 电子合同 Convert
 *
 * @author 合房租赁
 */
@Mapper
public interface ElectronicContractConvert {

    ElectronicContractConvert INSTANCE = Mappers.getMapper(ElectronicContractConvert.class);

    @Mapping(target = "contractId", source = "id")
    ElectronicContractGenerateRespVO convert(ElectronicContractDO bean);

    RoomInfoFillDTO convertRoomHouseRespVo2RoomInfoFillDTO(RoomHouseRespVo respVo);

    RoomInfoOwnerFillDTO convertFillDto2OwnerFillDto(RoomInfoFillDTO dto);

}
